using System;
using ContentRenderingApi.Exceptions;

namespace ContentRenderingApi.NodeData
{
    /// <summary/>
    internal class ChildNodeData : AbstractNodeData
    {
        private string _name;

        /// <summary/>
        internal ChildNodeData(string name) 
        {
            this._name = name;
        }

        /// <summary/>
        internal override bool IsParent()
        {
            return false;
        }

        /// <summary/>
        internal override bool IsRoot()
        {
            return false;
        }

        /// <summary/>
        internal override bool IsChild()
        {
            return true;
        }

        /// <summary/>
        internal override string Name
        {
            get { return this._name; }
        }

        /// <summary/>
        internal override int ParentLevel
        {
            get { throw new NodeDoesNotHaveTagLevelException(); }
        }
    }
}
